package de.gameduell.framework.chat {

	public class ChatHistory {
		
		private const MAX_HISTORY_ITEMS:int = 20;
		private var chatHistory:Array = new Array();
		
		public function ChatHistory(){
		}
		
		public function addMessageToHistory(aChatMessage:ChatMessage):void {
			chatHistory.push(aChatMessage);
			if(chatHistory.length > MAX_HISTORY_ITEMS){
				chatHistory.shift();
			}
		}
		
		public function get fullHistory():Array {
			return chatHistory;
		}
	}
}
